﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="DatabaseStorageDemoVB._Default" %>

<%@ Import Namespace="DatabaseStorageDemoVB.DatabaseStorageDemo.Storage" %>
<%@ Register TagPrefix="tc" Namespace="TallComponents.Web.Pdf" Assembly="TallComponents.Web.PdfViewer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head id="Head1" runat="server">
   <title>PDF Library Demo - PDFWebViewer.NET</title>
   <style type="text/css">
      body { font-family: Verdana, Arial, Helvetica, _sans; font-size: 12px; }
      img { border: none; }
      .thumb { margin: 0px; padding:0px; }
      .thumb img { border: solid 1px #999999; margin: 3px; }
      .thumb:hover img { border: solid 2px #66ff33; margin: 2px; }
      .active img { border: solid 2px black; margin: 2px; }
      a:active { outline: 0 none black; }
      #documents { border: 1px solid #999999; width: 180px; height: 754px; overflow: auto; font-size: 10px; }
      #documents ul { margin: 0px; padding: 0px; }
      #documents ul li { list-style: none outside; padding: 2px; margin: 3px; min-height: 32px; }
      #documents a { color: black; text-decoration: none; display: block; height: auto; width: auto; }
      #documents a:visited { color: black; }
      #documents li:hover { background-color: #eeeeee; color: Black; }
      #documents .info { font-size: 9px; color: #aaaaaa; }
   </style>
</head>
<body>
   <form id="Form1" method="post" runat="server" enctype="multipart/form-data">
   <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
   <table cellpadding="0" cellspacing="2" style="width: auto;">
      <tr>
         <td>
            <div id="documents">
            <ul>
            <% For Each info as DatabaseDocumentInfo In Documents%>
            <li>
               <a href="default.aspx?doc=<%= info.FileId %>">
               <img alt="<%= info.Title %>" src="img/pdf32.png" style="float: left" /><div style="margin-left: 36px;"><%= info.Title%><br />
               <span class="info"><%= info.FileName%><br />
               <%= string.Format( "{0} page{1}", info.PageCount, If(info.PageCount > 1, "s", "") )%></span></div></a>
            </li>
            
      <% Next%>
         </ul>
         </div>
         </td>
         <td valign="top" style="border: solid 1px #aaaaaa;">
            <tc:PdfViewerToolbar ID="Toolbar" runat="server" class="toolbar" PdfViewerControlId="pdfViewer" />
            <tc:PdfThumbnailsList ID="thumbnails" runat="server" PdfViewerControlId="pdfViewer" Width="650" Height="160" ServiceUrl="pageasimage.ashx" ThumbnailCssClass="thumb" SelectedThumbnailCssClass="active" Scale="0.16" Orientation="Horizontal"/>
            <tc:PdfViewer ID="pdfViewer" runat="server" Width="650" Height="570" ZoomFactor="0.75" ServiceUrl="pageasimage.ashx" />
         </td>
      </tr>
   </table>
   <div>
      Add document : <asp:FileUpload runat="server" id="Upload1" /> <asp:Button runat="server" ID="Submit" Text="Add" OnClick="OnAddClicked" />
   </div>
   </form>
</body>
</html>

